const http = require("../../moudles/http")
const transformStar = require("../../utils/index")
Page({
  data:{
    arr:[]
  },
  onLoad:function (){
    http({
      success:res=>{
        var arr = res.data
        arr.forEach(item=>{
          item.labels.push(item.price)
          var name = item.labels.join("/")
          item.name = name
          item.star = transformStar(item.rating)
        })
        console.log(arr);
        this.setData({
          arr
        })
      }
    })
  }
})
